<template>
	<view class="content">
		<image class="logo" v-on:click="change" src="/static/logo.png"></image>
		<view class="text-area">
			<text class="title">{{title}}</text>
		</view>
		<view v-if="!raining">今天天气真好</view>
		<view v-if="raining">下雨天，只能在家呆着了</view>
		<view v-if="state==='vue'">state的值是Vue</view>
		<view>State is {{state?'vue':'APP'}}</view>
		
		<view>
			<view v-if="state==='vue'">uni-app</view>
			<view v-else-if="state==='html'">HtML</view>
			<view v-else>APP</view>
		</view>
		<view v-for="item in arr" style="color: aqua;">
			{{item}}
		</view>
		
		
		<view v-for="(item,index) in 4" style="color:#36cdcd;">
			<view :class="'list-'+index%2">
				{{index%2}}
			</view>
		</view>
		
		<view v-for="(value,name,index) in object">
			{{index}}.{{name}}.{{value}}
		</view>
		
		<view v-for="item in arr" :key="item.id" style="color: burlywood;">
			{{item.id}}.{{item.name}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				raining: false,
				state: 'vue',
				arr: [{
						id: 1,
						name: 'uni-app'
					},
					{
						id: 2,
						name: 'HTML'
					}
				],
				object: {
					title: 'How to do lists in Vue',
					author: 'Jane Doe',
					publishedAt: '2020-04-10'
				}
			}
		},
		methods: {

		}
	}
</script>

<style>

</style>